﻿@using GameSchool.HtmlHelpers;
@model GameSchool.ViewModels.Project.ReturnViewModel
@{
    ViewBag.Title = "Skila verkefni";
}

<h2>Skila verkefni</h2>
<p>Notaðu formið hér að neðan til að skila upplýsingum um verkefni</p>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm(htmlAttributes: new { @class = "form-horizontal" }))
{
    @Html.ValidationSummary(true, "Ekki tókst að skila")
    <div>
        <fieldset>
            <legend>Verkefnaupplýsingar</legend>

             <div class="control-group">
                @Html.LabelFor(m => m.project.HoursToFinish, new { @class = "control-label" }, "Klukkutímar í skil")
                <div class="controls">
                    @Html.DisplayTextFor(m => m.project.HoursToFinish)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(m => m.project.Description, new { @class = "control-label" }, "Lýsing verkefnis")
                <div class="controls">
                    @Html.DisplayTextFor(m => m.project.Description)
                </div>
            </div>
              <div class="control-group">
                @Html.LabelFor(m => m.project.GradePercentage, new { @class = "control-label" }, "Vægi einkunnar")
                <div class="controls">
                    @string.Format("{0:P0}", Model.project.GradePercentage)
                </div>
            </div>
        </fieldset>
    </div>
}
@using (Html.BeginForm(htmlAttributes: new { @class = "form-horizontal" }))
{
    <div>
        <fieldset>
            <legend>Verkefnaskil</legend>
            <div class="control-group">
                @Html.LabelFor(m => m.projectReturns.ReturnDate, new { @class = "control-label" }, "Síðast skilað")
                <div class="controls">
                    @Html.DisplayTextFor(m => m.projectReturns.ReturnDate)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(m => m.projectReturns.ReturnComment, new { @class = "control-label" }, "Skilaboð til kennara")
                <div class="controls">
                    @Html.TextAreaFor(m => m.projectReturns.ReturnComment, new { @class = "input-xlarge", rows = "8" })
                    @Html.ValidationMessageFor(m => m.projectReturns.ReturnComment)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(m => m.project.ProjectReturns, new { @class = "control-label" }, "Skilaskrá")
                <div class="controls">
                    @Html.TextBoxFor(m => m.project.ProjectReturns, new { type = "file" })
                    @Html.ValidationMessageFor(m => m.project.ProjectReturns)
                </div>
            </div>
            <div class="form-actions">
                <input type="submit" class="btn btn-primary" value="Skila verkefni" />
                <a href="@Url.Action("List")" class="btn">Til baka í verkefnalista</a>
            </div>
        </fieldset>
    </div>
}